home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / CRS / crs59.d81 / rolodex.arc / ROLEDEX.REM (.txt) < prev    next >
GEOS ConVerT  |  2009-10-10  |  5KB  |  39 lines

  1. 5&Roledex.REM
  2. PRG formatted GEOS file V1.0
  3. Super NX-1000
  4. 0#GB YATZEESRC
  5. BLASTER'S CONVERTER V2.5
  6. ROLEDEXSRC
  7. ROLEDEX.REM
  8. Write Image V1.1
  9. Red Storm
  10. geoWrite    V1.1
  11. This file contains the REM's for Roledex.
  12. TO KEEP THE SIZE OF ROLEDEX DOWN TO A MORE MANAGABLE LEVEL ALL OF THE COMMENTS HAVE BEEN MOVED TO THIS FILE.  THE LINE NUMBERS LISTED REFER TO THOSE OF ROLEDEX.  6/10/90 WCC
  13. Lines 90-390 define all of the constants that Roledex uses.  Note also that the HEADER command is used make the data file unique.
  14. The initialization routine begins at line 430 (@Start).  It's pretty straightforward.  The routine is entered at @Resume to refresh the screen after a DA call.
  15. @InitScreen (line 600) clears the screen, draws the title, and throws up the menus.
  16. @RedrawScreen (750) is called after a DA call.  It does just what it's name implies.
  17. @DoProc (810) is used to 'fly' the airplane accross the screen.  As you can see it's rather simple - most of the work is done in the Sprite Editor.  @KillSprite is called when the plane finishes it's movement.  All it does is shut the jet sound off.
  18. @TopDB (960) is the driver for the initial DB.  A similar piece of code will probably be in most of your programs.  'choice' holds the number of the icon that the user clicked on and 'book$' holds the name of the file.
  19. @MakeBook creates a new Roledex.  The repeated calls to INSERT are used to mark all of the records as empty rather then unused.  Unused records will generate an error if you try to PTREC to them.
  20. @DError (1170) is used to trap and display errors.  The check for error #47 (the RUN/STOP key) is necessary to allow the user to exit the program.
  21. @UpdateRec (1250) will update the current record if the user is creating a new record or if the current record has been edited. Note how the current record is deleted 
  22. before
  23.  the search.
  24. @Search (1380) does a binary search to find a particular record.  The variable 'key$' holds the string to search for.  Note the use of plain$.  A name string can never equal this value.  This allows an initialization value that will never match.
  25. @SeaRec (1570) is called when the user wants to search for a particular record.  It sets up key$ and calls @Search to do the actual search.
  26. @GetRec (1680) reads in the record that is pointed to by curRec.  Note that the strings are initialized to plain$.  This is used to indicate an empty field.
  27. @EditBox (1770) simply draws the editing box on the screen and puts up the icons.
  28. @Display (1870) is the routine that fills the edit box with the heading, titles, and data.  No surprizes here.
  29. The menus routines (2160-2350) are the subroutines that are executed when the user selects a menu item.  Each is little more than a series of GOSUBs..
  30. @EButton (2390) handles button presses.  Note the quick check at the begining of the routine.  Checking all four boxes takes a bit of time, without that initial check the user would have to hold the P
  31. @EButton (2390) handles button presses.  Note the quick check at the begining of the routine.  Checking all four boxes takes a bit of time, without that initial check the user would have to hold the button down longer than normal when clicking on the menu or icons.  If the button is released before @EButton returns control to Geos the press would not register.
  32. Beginning at 2490 are the icon service routines @IncRec, @DecRec, @DelRec, and @AddRec.  These are called whenever the appropriate icon is clicked on.
  33. Next comes the four edit routines (2980-3270) that are called by @EButton.  They control the editing of a record.  Note the use of the 
  34. dirty
  35.  flag.  It is used to indicate that the record has been modified. @UpdateRec uses this flag to decide if it needs to write the record back onto the disk. 
  36. @PrintAll (3290) creates hardcopy of all records.  There's nothing elaborate here, it simply uses a REPEAT...UNTIL loop to step through the records.  Note the PRINT command goes to the printer after a PRNTER 1 call.
  37. @GetString (3530) is used to input a string from the user.  The geoBasic input routines will not allow the user to enter a comma (sigh). Note how a sprite is used as a cursor.  The normal text prompt is useless because it won't flash unless Mainloop has control, but it can't have control because geoBasic has no command to intercept a keypress (double sigh).
  38.                                                         
  39.